package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SpecMapper extends Mapper<Spec> {
    /**
     *倚窗听喧嚣
     *2020/5/14
     *$根据分类名称查询规格
     */
    @Select("SELECT DISTINCT a.* FROM tb_spec a JOIN tb_category b ON a.template_id = b.template_id WHERE b.name=#{cateName}")
    List<Spec> findByCateName(String cateName);
}
